<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>高分题库</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <!-- <link rel="shortcut icon" href="http://favicon.ico"> -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">

    <!--<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">-->

    <!-- 固定的css 和 common.js 的引用    -->
    <link rel="stylesheet" href="https://gitee.com/huaflower/CommonFile/raw/master/css/sm.min.css">
    <link rel="stylesheet" href="https://gitee.com/huaflower/CommonFile/raw/master/css/sm-extend.min.css">
    <script type="text/javascript" src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/common/common/common.js"></script>
    
    
    <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.css">
	<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
	<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
	
	<script type="text/javascript" src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/js/vconsole.min.js"></script>
		<script>
			var vConsole = new VConsole();
		</script>
    
<style type="text/css">
  /*css 的样式都放在这里*/
 
 	/*图标的排列*/
 	#table_div_shangjuli{
 		padding-top: 14px;
 		/*height: 100px;*/
 		/*border-bottom:solid 8px #EFEFF4;*/
 		border-bottom:solid 8px #F8F8F8;
 		padding-bottom: 8px;
 	}
    #tiku_tubiao{
    	text-align: center;
    }
    #tiku_tubiao a{
    	color: #636363;
    }
    
    #tiku_tubiao img{
    	width: 2.6rem;
/*    	height: 60%;*/
    }
    #tiku_tubiao div{
    	text-align: center;
    	font-size: 12px;
    }
   #table_tubiao{
   		width: 100%;
   		border: none;
   }   
    #table_tubiao tr td{
    	width: 20%;
    	border: none;
    }
    /*更多*/
   	#gengduo_tu{
   		float: right;
   	}
   	#gengduo_beijing{
   		/*更多背景图标*/
   		background: url(https://gitee.com/huaflower/honeybee-commonfile/raw/master/img/img_more_right.png);
   		/*background: url(https://gitee.com/huaflower/honeybee-commonfile/raw/master/img/index.png);*/
   		background-repeat: no-repeat;
		/*background-position: calc(100%) center;*/
		background-position: calc(97%) center;
		background-size: 0.8rem 0.5rem;
   	}
    #gaofen_liebiao{   	   	
    	width: 94%;
    	margin-left: 3%;
    	height: 2.2rem;
    	/*border-bottom: solid 1px #EFEFF4;*/
    	border-bottom: solid 1px #F8F8F8;
    	/*display: table-cell;*/
    	display: flex;
    	justify-content: space-between;
    	align-items: center;
    }
    #zuoti_jilu{
    	/*line-height: 50px;*/
    }
    #zuoti_gengduo{
    	/*float: right;*/
    	padding-right: 8%;
    	padding-left: 8%;
    	/*line-height: 50px;*/
    	font-size: 15px;
    	/*border: solid red 1px;*/
    }
    #zuoti_gengduo_tubiao{
    	float: right;  	
    }
    /*列表*/
    #jilu_liebiao_size{
    	font-size: 15px;
    	text-align: center;
    }
    #jilu_one{
    	float: left;
    }
    #jilu_two{
    	
    }
    #jilu_three{
    	border: solid 1px red;
    	float: left;
    }
    /*记录块*/
   	.jilukuai{
   	width: 94%;
   	margin-left: 3%;
   /* height: 50px;*/
    margin-top: 10px;
    /*background-color: #EFEFF4;*/
    background-color: #F8F8F8;
    padding-bottom: 10px;
    padding-top: 10px;
   	}
   	#jilu_div{
   		margin-left: 0.7rem;
   		font-size: 13px;  
   		display: flex;	
   		justify-content: space-between;	
   	}
   	#jilu_div_span_left{
   		/*float: left;*/
   		/*position: fixed;
   		left: 5%;*/
   		/*margin-left: 0.7rem;*/
   		/*margin-right: ;*/
   		/*position: relative;*/
   	}
   	#jilu_div_span_center{  		
   	}
   	#jilu_div_span_right{
   		/*float: right;*/
    	/*color: #636363;*/
   		/*position: fixed;
   		right: 5%;*/
   	}
   	.jilu_mulu_class{
   		margin-left: 0.7rem;
   		font-weight: 600;
   		color: #02CAAD;
   	}
   	/*做题记录完成与否颜色变化*/
   	.yiwancheng{
   		color:#2EBBFF;
   	}
   	.weiwancheng{
   		color:#FF7B90;
   	}
   	/*整体样式*/
   	.page-current{
   		background-color: white;
   	}
</style>


</head>
<body>
<div class="page-group">
    <div class="page page-current">
       
        <!-- html代码内容区域 -->
    	<div id="" >
    		<div id="table_div_shangjuli">
    		<table id="table_tubiao" border="" cellspacing="" cellpadding="">
    			<tr>
    				<td>
    					<div id="tiku_tubiao">
    						<a href="" onclick="zhangjietongbu()" >
    							<img id="" src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/img/zhangjietongbu.png"/>
    							<!--<img id="" src="../img/章节同步.png"/>-->
			    				<div id="">
			    					章节同步
			    				</div>
    						</a>
		    				
		    			</div>
    				</td>
    				<td>
    					<div id="tiku_tubiao">
		    				<a href="" onclick="linianzhenti()">
		    					<img src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/img/linianzhenti.png"/>
		    					<!--<img id="" src="../img/历年真题.png"/>-->
			    				<div id="">
			    					历年真题
			    				</div>
		    				</a>
		    			</div>
    				</td>
    				<td>
    					<div id="tiku_tubiao">
		    				<a href="" onclick="meiriyilian()">
		    					<img src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/img/meiriyilian.png"/>
		    					<!--<img id="" src="../img/每日一练.png"/>-->
			    				<div id="">
			    					每日一练
			    				</div>
		    				</a>
		    			</div>
    				</td>
    				<td>
    					<div id="tiku_tubiao">
		    				<a href="" onclick="zhuanxianglianxi()">
		    					<img src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/img/zhuanxianglianxi.png"/>
		    					<!--<img id="" src="../img/专项练习.png"/>-->
			    				<div id="">
			    					专项练习
			    				</div>
		    				</a>
		    			</div>
    				</td>
    				<td>
    					<div id="tiku_tubiao">
		    				<a href="" onclick="monikaochang()">
		    					<img src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/img/monikaochang.png"/>
		    					<!--<img id="" src="../img/模拟考场.png"/>-->
			    				<div id="">
			    					模拟考场
			    				</div>
		    				</a>
		    			</div>
    				</td>
    			</tr>
    		</table>   			
    		</div>
    		<!--列表-->
    		<div id="gengduo_beijing">
    			<div id="gaofen_liebiao" >   			
					<span id="zuoti_jilu" >
						做题记录
					</span>
					<span id="zuoti_gengduo" onclick="more_jilu()">
						更多				
					</span>	
    			</div>
    		</div>
    		
    		<!--记录块-->
    		<!--将获取的内容插入该div-->
    		<div id="charujilu">
	    		<!--记录取-->
	    		
    		</div>
    		
    	</div>
    </div>
</div>





<!-- 固定的js引用，所有的jQuery 要用 $$ 表示 -->
<script type="text/javascript" src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/jquery-1.11.1.min.js"></script>
<!-- 这一行代码是为了 避免js冲突 -->
<script type="text/javascript">var $$ =jQuery.noConflict();</script>
<script type='text/javascript' src='https://gitee.com/huaflower/honeybee-commonfile/raw/master/zepto/zepto.min.js' charset='utf-8'></script>
<script type='text/javascript' src='https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/sm.min.js' charset='utf-8'></script>
<script type='text/javascript' src='https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/sm-extend.min.js' charset='utf-8'></script>


<script type="text/javascript">
// 函数区域，函数放在“初始化区域的上面”


	function getParams(data){
// 		data需要转成json调用 ，函数urlParamParseJson();
	    var jsonData = urlParamParseJson(data);
	  	var params = {
	   		user_id:jsonData.id,
	   		offset:'0',
        limit:'5'
	   	}
	   	net_request('get','user/paper',params,successCallBack,errorCallBack);
	}
//	成功的回调函数
  	function successCallBack(data){
		console.log(data);
      	if(isNotNull(data)){
	        if(data.success==true){
	        	$$("#charujilu").html("");
	          	var curval = data.data;

//				限制记录数量
				var jilu_num ="";
				
//				遍历做题记录
	           	for(var ii=0;ii<curval.length;ii++){
//	          		添加内容
		          	var content ="";
//					title,完成情况,正确率,完成时间
					var title="";
					var complete="";
					var correct="";
					var comtime="";
	           		if(ii>=5){break;}
//					title
		         	if(isNotNull(curval[ii].title)){
		         		title = curval[ii].title;
		           	}  
//		           	完成情况

					var zhengquelvcol = 'style="color:black;"';
		           	if(isNotNull(curval[ii].question_num)&&isNotNull(curval[ii].finish_num)){
//		         		complete
						if(curval[ii].question_num==curval[ii].finish_num){
							complete ='<span id="jilu_div_span_left" class="yiwancheng">已完成</span>';
							zhengquelvcol = 'style="color:#2EBBFF;"';
						}
						if(curval[ii].question_num>curval[ii].finish_num){
							complete ='<span id="jilu_div_span_left" class="weiwancheng">未完成</span>';
							zhengquelvcol = 'style="color:#FF6A49;"';
						}
		           	}
//	   	        	正确率
//					correct_num正确数量
//					finish_num完成数量
		           	if(isNotNull(curval[ii].correct_num)&&isNotNull(curval[ii].question_num)){
								 correct = Math.round(curval[ii].correct_num/curval[ii].question_num*100*100)/100;
								 correct = (correct + '').indexOf('.') > -1 ? correct.toFixed(2) : correct
		         			correct = "正确率 "+correct+"%"
		           	} 
//	        	   	时间
					if(isNotNull(curval[ii].updated_at)){
		         		updated_at = curval[ii].updated_at;
		           	} 
	           		content	+= '\
	           			<div onclick="zuoti_history_click('+curval[ii].paper_id+')" class="jilukuai" id="">\
			           		<div id="jilu_mulu" class="jilu_mulu_class">'+title+'</div>\
			           		<div id="jilu_div" ><span>\
				           		'+complete+'\
				           		<span id="jilu_div_span_center_'+ii+'" '+zhengquelvcol+' class="margincenter">'+correct+'</span></span>\
				           		<span id="jilu_div_span_right">'+updated_at+'</span>\
			           		</div>\
			           	</div>\
	           		';
	           		$$("#charujilu").append(content);
	           		var kuai_width = "1rem";
	           		kuai_width = $$("#jilu_div").css('width');
//	           		var marginleft = "#jilu_div_span_cente_"+ii;
//	           		console.log(marginleft);
//	           		$$(marginleft).css("margin-left",kuai_width)
//					kuai_width = kuai_width.replace('px','');
					kuai_width = parseInt(parseInt(kuai_width)/15)+"px";
//					console.log(kuai_width);
	           		$$(".margincenter").css("margin-left",kuai_width);
	           	}
//	           	$$("#charujilu").html(content);
					
	        }
    	}
 	}
// 	失败的回调函数
  	function errorCallBack(data){
    	console.log(data);
  	}
  	
//	章节同步
	function zhangjietongbu(){
		native_goto('local/zhangjietongbu_gaofentiku');
	}
//	历年真题
	function linianzhenti(){
		native_goto('local/linianzhenti_gaofentiku');
	}
//	每日一练
	function meiriyilian(){
		native_goto('local/meiriyilian_gaofentiku');
	}
//	专项练习
	function zhuanxianglianxi(){
		native_goto('local/zhuanxianglianxi_gaofentiku');
	}
//	模拟考场
	function monikaochang(){
		native_goto('local/monikaochang_gaofentiku');
	}
//	更多
	function more_jilu(){
		native_goto('local/more_jilu_gaofentiku');
	}
	
	//更过题跳转
	function zuoti_history_click(cid){
		native_goto('local/tileizhenghe?cid='+cid);
	}
   	// 初始化区域
   	$$(function () {
			//  getParams();
   		
//       	getParams("aaa?id="+curuserid);

      	$.init();
   	});

    
</script>
</body>
</html>